﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;
using System.Data;
using ModuleDALCore;


namespace DAL
{
    public class Sys_ModuleDAO:DALBase
    {
            private String _SpName ;
        public String SpName
        {
            get { return "SpSys_Module"; }
            set { _SpName = value; }
        }
        public Sys_ModuleDAO()
        {
            OpenConnect();
        }
        public DataTable GetIdModule(Sys_Module module,int flag)
        {
            DataTable dt = new DataTable();
            try
            {
                dt = DBManager.Intance.ExecuteDataTable(SpName, ConvertClassToArray.GetParamName((Sys_Module)module, flag), ConvertClassToArray.GetValues((Sys_Module)module, flag));
            }
            catch (Exception ex)
            {
                throw new InvalidProgramException(ex.Message);
            }
            return dt;
        }
    }
}
